package com;

import com.pojo.Orders;
import com.pojo.Person;
import com.pojo.Product;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 金妞妞
 * @author 123456
 * @description 针对表【tb_orders】的数据库操作Mapper
 * @createDate 2024-11-13 15:41:56
 * @Entity com.pojo.Orders
 @@ -26,4 +31,11 @@ public interface OrdersMapper {

 Orders findOrdersWithProduct(Integer id);

 @Select("select * from tb_orders where user_id=#{id}"){
 @Results({
 @Result(id = true,column = "id" , property = "id"),
 @Result(column = "number" , property = "number"),
 })
 List<Orders> selectOrdersByUserId(int user_id);{

 }
